{extend name="public/base"/}

{block name="body"}
<div class="main-box clearfix">
	<header class="main-box-header clearfix">
		<div class="pull-left">
			<h2>新增模型</h2>
		</div>
		<div class="pull-right">
		</div>
	</header>
	<div class="main-box-body clearfix">

		<!-- 表单 -->
		<form id="form" action="{:url('update')}" method="post" class="form-horizontal form">
			<!-- 基础 -->
			<div id="tab1" class="tab-pane in tab1">
				<div class="form-group">
					<label class="col-lg-2 control-label">模型标识</label>
					<div class="col-lg-6 col-sm-10">
						<input type="text" class="form-control " name="name" value="">
						<span class="help-block">（请输入文档模型标识）</span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-lg-2 control-label">模型名称</label>
					<div class="col-lg-6 col-sm-10">
						<input type="text" class="form-control " name="title" value="">
						<span class="help-block">（请输入模型的名称）</span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-lg-2 control-label">模型类型</label>
					<div class="col-lg-3 col-sm-10">
						<select name="extend" class="form-control" style="width:auto">
							<option value="2">独立模型</option>
							<option value="1" selected="selected">文档模型</option>
						</select>
						<span class="help-block">（目前只支持独立模型和文档模型）</span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-lg-2 control-label">引擎类型</label>
					<div class="col-lg-3 col-sm-10">
						<select name="engine_type" class="form-control" style="width:auto">
							<option value="MyISAM">MyISAM</option>
							<option value="InnoDB">InnoDB</option>
                            <option value="MEMORY">MEMORY</option>
                            <option value="BLACKHOLE">BLACKHOLE</option>
                            <option value="MRG_MYISAM">MRG_MYISAM</option>
                            <option value="ARCHIVE">ARCHIVE</option>
						</select>
						<span class="help-block"></span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-lg-2 control-label">是否需要主键</label>
					<div class="col-lg-10">
						<select name="need_pk" class="form-control" style="width:auto">
							<option value="1" selected="selected">是</option>
							<option value="0">否</option>
						</select>
						<span class="help-block">（选“是”则会新建默认的id字段作为主键）</span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-lg-2 control-label">是否会员显示</label>
					<div class="col-lg-10">
						<select name="is_user_show" class="form-control" style="width:auto">
							<option value="1" selected="selected">是</option>
							<option value="0">否</option>
						</select>
						<span class="help-block">（选“是”则会新建默认的id字段作为主键）</span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-lg-2 control-label">模型图标</label>
					<div class="col-lg-6 col-sm-10">
						<input type="text" class="form-control " name="icon" value="">
						<span class="help-block">（模型图标）</span>
					</div>
				</div>
			</div>

			<!-- 按钮 -->
			<div class="form-group">
				<div class="col-lg-offset-2 col-lg-10">
					<input type="hidden" name="id" value="{$info.id|default=''}">
					<button class="btn btn-success submit-btn ajax-post" type="submit" target-form="form-horizontal">确 定</button>
					<button class="btn btn-danger btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
				</div>
			</div>
		</form>
	</div>
</div>

{/block}